import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import '@/styles/common.scss'
// 引入pinia持久化存储
import piniaPluginPersistedState from 'pinia-plugin-persistedstate'

// 引入懒加载指令插件并且注册
import {lazyPlugin} from '@/directives'
// 引入全局组件插件
import { componentPlugin } from '@/components'


const app = createApp(App)
const pinia = createPinia()
pinia.use(piniaPluginPersistedState)
app.use(pinia)
app.use(router)
app.use(lazyPlugin)
app.use(componentPlugin)

app.mount('#app')
